<template>
	<view class="comments-page">
		<!-- 我的评论 -->
		<view class="item u-flex u-col-top" v-for="item in list" :key="item.message_id">
			<u-image
				:src="item.userinfo.avatar == '' ? 'https://wxcode.sowreap.cn/nongmuWeChatImage/static/images/avatar.png' : item.userinfo.avatar"
				width="68rpx" height="68rpx" shape="circle"></u-image>
			<view class="u-m-l-20">
				<view class="u-font-28">{{ item.userinfo.nickname }}</view>
				<view class="u-font-24 u-tips-color u-m-t-10">{{ item.time }}</view>
				<view class="u-font-28 u-m-t-30">{{ item.content }}</view>
			</view>
		</view>

		<!-- <view class="item u-flex u-col-top">
			<u-image src="https://wxcode.sowreap.cn/nongmuWeChatImage/static/images/avatar.png" width="68rpx"
				height="68rpx" shape="circle"></u-image>
			<view class="u-m-l-20">
				<view class="u-font-28">游客_ODA5NEwmj</view>
				<view class="u-font-24 u-tips-color u-m-t-10">2023-05-30 16:50</view>
				<view class="u-font-28 u-m-t-30">地方很美，偶尔远离大城市的喧嚣看看乡下美景，
					别有一番滋味</view>
			</view>
		</view> -->

	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [
					// 	{
					// 	message_id: 1,
					// 	content: "放松的方式的方式的方式地方上的放松的方式地方上的放松的方式对发生的",
					// 	userinfo: {
					// 		nickname: "150****0001",
					// 		avatar: ""
					// 	},
					// 	time: "2023-10-08 10:09:02"
					// },
				]
			}
		},
		onLoad() {
			this.get_comment_myComment()
		},
		methods: {
			// 我的评论
			get_comment_myComment() {
				this.$http({
					url: this.api.comment_myComment,
					method: 'GET',
				}).then(res => {
					// console.log(res, '我的评论');
					if (res.code == 1) {
						this.list = res.data.list
					}
				})
			}
		}
	}
</script>

<style scoped lang="scss">
	.comments-page {
		.item {
			padding-bottom: 60rpx;
			border-bottom: 1px solid #E6E6E6;
			margin-bottom: 30rpx;
			position: relative;
		}
	}
</style>